package com.guopiao.vat.cronjob.job;


import com.guopiao.vat.service.SignedService;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.Date;

/**
 * 发票验签失败数据统计
 *
 * @author qiaoyongda
 * @date 2018-8-8 上午09:27:57
 * @version V1.0
 */
@Component
public class CheckSignFailJob implements BaseJob{

    private static Logger _log = LoggerFactory.getLogger(CheckSignFailJob.class);

    @Autowired
    private SignedService signedService;

    public static CheckSignFailJob checkSignFailJob;

    public CheckSignFailJob() {

    }

    @PostConstruct
    public void init() {
        checkSignFailJob = this;
    }

    public void execute(JobExecutionContext context)
            throws JobExecutionException {
        _log.info("CheckSignFail Job任务开始: " + new Date());
        checkSignFailJob.signedService.checkSignFailJob();
        _log.info("CheckSignFail Job任务结束: " + new Date());
    }
}
